<%@ page import="cn.kgc.service.NewsDetailService" %>
<%@ page import="cn.kgc.service.NewsDetailServiceImpl" %>
<%@ page import="cn.kgc.pojo.NewsDetail" %>
<%@ page import="java.util.List" %>
<%@ page import="cn.kgc.util.DataBaseUtil_jndi" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    NewsDetailService newsDetailService =new NewsDetailServiceImpl();
    List<NewsDetail> list= newsDetailService.getAllNewsDetail();
    //jdk8 流操作遍历数据 n 就是集合中的数据
    for (NewsDetail n:
         list) {
        out.println(n.toString());
    }
    out.print("</br>");
    out.println(DataBaseUtil_jndi.getConnect()==DataBaseUtil_jndi.getConnect());
%>